mksunxi_fit_atf.sh: Allow for this to complete when bl31.bin is missing
authorTom Rini <[email protected]>
Mon, 22 May 2017 19:40:11 +0000 (15:40 -0400)
committerTom Rini <[email protected]>
Tue, 23 May 2017 00:18:01 +0000 (20:18 -0400)
In situations like an autobuilder we are likely to not have bl31.bin
present and thus would fail to build and propagate the error upwards.
Instead, print a big warning to stderr so that human will see that
something is wrong but complete the build.

Cc: Maxime Ripard <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
board/sunxi/mksunxi_fit_atf.sh

index ecea1b839bdf261d25a45f8422da50dd71c060e5..b1d6e0e16a56e14a6efa1c87a8602fc497990602 100755 (executable)
@@ -7,6 +7,12 @@
 
 [ -z "$BL31" ] && BL31="bl31.bin"
 
+if [ ! -f $BL31 ]; then
+       echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
+       echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
+       BL31=/dev/null
+fi
+
 cat << __HEADER_EOF
 /dts-v1/;